<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>

<body>
  <script>
    // 演示 promise 的状态是凝固的
    const p = new Promise(function(resolve,reject){
      reject('失败')

      resolve()
    })
    console.log(p);
    p.catch(res=>console.log(res))
  </script>
</body>

</html>